package com.jiezhuo.service.impl.jss;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiezhuo.entity.cmeduSchool.JzgNewMenu;
import com.jiezhuo.entity.jssgl.JssStuYd;
import com.jiezhuo.entity.jssgl.JssXtAppmenu;
import com.jiezhuo.mapper.jss.JssStuYdMapper;
import com.jiezhuo.mapper.jss.JssXtAppmenuMapper;
import com.jiezhuo.service.jss.JssXtAppmenuService;
import com.jiezhuo.utils.MeunUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * 服务接口实现
 *
 * @author kancy
 * @description 由 Mybatisplus Code Generator 创建
 * @since 2024-06-13 08:48:15
 */
@Slf4j
@RequiredArgsConstructor
@Service
public class JssXtAppmenuServiceImpl extends ServiceImpl<JssXtAppmenuMapper, JssXtAppmenu> implements JssXtAppmenuService {
    private final JssXtAppmenuMapper jssXtAppmenuMapper;

    @Override
    public ArrayList<JzgNewMenu> getMenuTree(String userId) {
        ArrayList<JzgNewMenu> menuTree = jssXtAppmenuMapper.getMenuTree(userId);
        ArrayList<JzgNewMenu> objects = MeunUtils.getJzgNewMenus(menuTree);

        return objects;
    }

}